home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / Tools & Goodies / IntlTest / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-04-23  |  3.2 KB  |  125 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWPART_H
  20. #include "FWPart.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWRESFIL_H
  26. #include "FWResFil.h"
  27. #endif
  28.  
  29. // ----- Foundation Layer -----
  30.  
  31. #ifndef FWSTDDEF_H
  32. #include "FWStdDef.h"
  33. #endif
  34.  
  35. #ifndef FWBNDSTR_H
  36. #include "FWBndStr.h"
  37. #endif
  38.  
  39.  
  40. //========================================================================================
  41. // Forward Declarations
  42. // Any references to imported classes (FW_) have to be wrapped in import on/off
  43. // because SCpp won't import their methods otherwise. This is a temporary bug fix.
  44. //========================================================================================
  45.  
  46. class CIntlTestContent;
  47. class CIntlTestFrame;
  48. class CEditView;
  49. class CIntlTestSelection;
  50.  
  51. //========================================================================================
  52. // CIntlTestPart
  53. //========================================================================================
  54.  
  55. class CIntlTestPart : public FW_CPart
  56. {
  57.   public:
  58.     FW_DECLARE_AUTO(CIntlTestPart)
  59.     
  60. //----------------------------------------------------------------------------------------
  61. //    Initialization/Destruction
  62. //
  63.   public:
  64.     CIntlTestPart(ODPart* odPart);
  65.     virtual ~CIntlTestPart();
  66.  
  67.     virtual void Initialize(Environment* ev);
  68.  
  69. //----------------------------------------------------------------------------------------
  70. //    Inherited API
  71. //
  72.   public:
  73.     virtual FW_CContent* NewPartContent(Environment* ev);
  74.  
  75.     virtual FW_CFrame*    NewFrame(Environment* ev,
  76.                                  ODFrame* odFrame,
  77.                                  FW_CPresentation* presentation,
  78.                                  FW_Boolean fromStorage);
  79.  
  80.     virtual FW_Boolean    DoAdjustMenus(Environment* ev,
  81.                                       FW_CMenuBar* menuBar, 
  82.                                       FW_Boolean hasMenuFocus,
  83.                                       FW_Boolean isRoot);
  84.  
  85.     virtual FW_Boolean    DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
  86.  
  87. //----------------------------------------------------------------------------------------
  88. //    New API
  89. //
  90.   public:
  91.     void                PartChanged(Environment* ev);
  92.         // Call this after changing part data, to notify the proper authorities
  93.  
  94.     CIntlTestContent*    GetPartContent();
  95.     CIntlTestSelection*    GetTestSelection();
  96.     ODID                WhichEditViewIsActive(Environment* ev);
  97.  
  98.     void                UpdateTextData(Environment* ev);
  99.     void                UpdateViewsFromTextData(Environment* ev);
  100.  
  101. //----------------------------------------------------------------------------------------
  102. //    Data Members
  103. //
  104.   private:
  105.     CIntlTestContent*    fPartContent;
  106.     CIntlTestSelection*    fTestSelection;
  107.     FW_CPresentation*    fPresentation;
  108.     CIntlTestFrame*        fTestFrame;
  109. };
  110.  
  111. //----------------------------------------------------------------------------------------
  112. inline CIntlTestContent* CIntlTestPart::GetPartContent()
  113. {
  114.     return fPartContent;
  115. }
  116.  
  117. //----------------------------------------------------------------------------------------
  118. inline CIntlTestSelection* CIntlTestPart::GetTestSelection()
  119. {
  120.     return fTestSelection;
  121. }
  122.  
  123.  
  124. #endif
  125.